using System.Collections.Generic;
using System.Web.Mvc;
using Headspring.Training.Core.Model;

namespace Headspring.Training.UI.Models
{
	public class EmployeeOptionalSelectList : EmployeeSelectList
	{
		public EmployeeOptionalSelectList(IEnumerable<Employee> employees)
			: base(employees)
		{
		}

		public EmployeeOptionalSelectList(IEnumerable<Employee> employees,
		                                  Employee selectedEmployee)
			: base(employees, selectedEmployee)
		{
		}

		public override IList<ListItem> GetListItems()
		{
			IList<ListItem> items = base.GetListItems();
			var anyItem = new ListItem();
			anyItem.Text = "<Any>";
			anyItem.Value = "";
			items.Insert(0, anyItem);
			return items;
		}
	}
}